package com.lww.feature.test.design.pattern.component;

import javax.sound.midi.Soundbank;

/**
 * @author: liweiwei
 * @date: 2019/1/23
 */
public class Leaf implements Component {
    @Override
    public void operation() {
        System.out.println("我是叶子节点");
    }

    @Override
    public void add(Component c) {
        throw new RuntimeException("不支持该操作");
    }

    @Override
    public void remove(Component c) {
        throw new RuntimeException("不支持该操作");

    }

    @Override
    public void getChild(int i) {
        throw new RuntimeException("不支持该操作");
    }
}
